package com.ww.basic.fun

/**
 * 高阶函数
 */
object funTest4 {
  def main(args: Array[String]): Unit = {
    println(apply(layout, 10))
  }

  // 函数f和值v作为参数，而函数f又调用了参数v
  def apply(f: Int => String, v: Int) = f(v)

  def layout[A](x: A) = "[" + x.toString + "]"
}
